
routes = {(1,1):2, (1,0):1, (0,1):1}
def routeLen(startx, starty):
    if routes.has_key((startx,starty)):
        return routes[(startx,starty)]
    else:
        rl = 1
        if startx <> 0 and starty <> 0:
            rl = routeLen(startx-1, starty) + routeLen(startx, starty-1)
        routes[(startx,starty)] = rl 
        return rl
    
def main():
    print routeLen(20,20)
main()
